package joodin.impl.widgets;

import joodin.impl.widgets.internal.PopupButtonImpl;

import org.jowidgets.common.widgets.controler.IItemStateListener;
import org.jowidgets.spi.widgets.ISelectableMenuItemSpi;

import com.vaadin.ui.CheckBox;

public class PopupCheckButtonImpl extends PopupButtonImpl implements ISelectableMenuItemSpi{

	public PopupCheckButtonImpl() {
		super(new CheckBox());
	}
	
	@Override
	public CheckBox getUiReference() {
		return (CheckBox) super.getUiReference();
	}

	@Override
	public boolean isSelected() {
		return (Boolean) getUiReference().getValue();
	}

	@Override
	public void setSelected(boolean selected) {
		getUiReference().setValue(selected);
	}

	@Override
	public void addItemListener(IItemStateListener listener) {
		
		
	}

	@Override
	public void removeItemListener(IItemStateListener listener) {
			
	}

}
